using System;
using System.Collections.Generic;
using System.IO;
namespace IcsSEMCtrl.Util
{
	public class StatisticalFileModificationComparer : IComparer<FileInfo>
	{
		public int Compare(FileInfo x, FileInfo y)
		{
			int result;
			if (x == null)
			{
				if (y == null)
				{
					result = 0;
				}
				else
				{
					result = 1;
				}
			}
			else
			{
				if (y == null)
				{
					result = -1;
				}
				else
				{
					if (x.LastWriteTime.Ticks > y.LastWriteTime.Ticks)
					{
						result = 1;
					}
					else
					{
						if (x.LastWriteTime.Ticks < y.LastWriteTime.Ticks)
						{
							result = -1;
						}
						else
						{
							result = 0;
						}
					}
				}
			}
			return result;
		}
	}
}
